<template>
	<view class="detail-view">
		<view class="top-bar"><uni-navbar :fixed="true" :back="true" color="#fff" title="内容详情"></uni-navbar></view>

		<view class="detail-info" v-show="willInfo.id">
			<view class="site-box">
				<view class="p-info">
					<view class="p-name">{{ willInfo.createName }}</view>
					<view class="left"><image class="image" :src="$imagePreview(willInfo.createAvatar)" mode="aspectFill"></image></view>
					<view class="right">
						<view class="p-time">时间：{{ willInfo.createTime }}</view>
						<view class="p-phone">联系电话：{{ willInfo.phone }}</view>
						<view class="p-no">问题编号：{{ willInfo.opinionNo }}</view>
						<view class="p-nick">代表：{{ willInfo.representiveName }}</view>
					</view>
				</view>
				<view class="label-info">
					<view class="item" @click="onTts()">
						<u-icon v-if="!play" class="icon" name="volume-fill" color="#09f" size="40"></u-icon>
						<u-icon v-else class="icon" name="pause-circle-fill" color="#09f" size="40"></u-icon>
						语音播报
					</view>
					<view class="item" @click="call(willInfo)">
						<u-icon class="icon" name="phone-fill" color="#0f0" size="40"></u-icon>
						拨打电话
					</view>
				</view>
			</view>
			<view class="info-detail">
				<view class="overflow">
					<uni-parse :content="willInfo.opinionDescribe"></uni-parse>
					<view class="com-box">发生地点: {{ willInfo.address }}</view>
				</view>
			</view>
		</view>

		<!-- <view class="uploader-add" @click="onTts">
			<image v-if="!play" src="/static/img/icon_76.png" mode="widthFix"></image>
			<image src="/static/img/icon_77.gif" v-else mode="widthFix"></image>
		</view> -->

		<view class="file-list" v-if="fileList2.length > 0">
			<view>附件:</view>
			<view class="file-item" v-for="(item, index) in fileList2" :key="index" @click="$showLine(item)">
				<view class="file-name clamp">{{ item.name }}</view>
				<view class="right-type">预览</view>
			</view>
		</view>

		<block v-if="willInfo.nodeStatus == 1 && willInfo.representiveId == userId">
			<view class="com-h2"><text class="text">问题审查</text></view>
			<view class="form-box">
				<u-form :model="form">
					<u-form-item class="form-item" required label="处理意见" labelAlign="left" label-width="150" prop="idea">
						<u-radio-group v-model="idea" @change="ideaGroupChange" :key="idea">
							<u-radio v-for="(item, index) in ideaList" :key="index" :name="item.name">{{ item.label }}</u-radio>
						</u-radio-group>
					</u-form-item>

					<u-form-item class="form-item" required label="问题分类" labelAlign="left" label-width="150" prop="type" v-if="idea != '2'">
						<u-radio-group v-model="type" @change="typeGroupChange" :key="type">
							<u-radio v-for="(item, index) in typeList" :key="index" :name="item.name" width="260">{{ item.label }}</u-radio>
						</u-radio-group>
					</u-form-item>
				</u-form>
			</view>

			<view class="fiexd-btm"><u-button class="form-btn" type="error" @click="confirm">提交</u-button></view>
		</block>

		<block v-if="willInfo.nodeStatus == 1 && $roleCodes('llz_gly_new') && willInfo.stationId == stationId">
			<block v-if="willInfo.handlingResulst == '1' || willInfo.handlingResulst == '2'">
				<view class="com-h2"><text class="text">问题审查</text></view>
				<view class="form-box" v-if="!flag">
					<u-form>
						<u-form-item class="form-item" label="处理意见" labelAlign="left" label-width="190">
							<view>{{ willInfo.handlingResulstName }}</view>
						</u-form-item>

						<u-form-item class="form-item" label="问题分类" labelAlign="left" label-width="190" v-if="willInfo.handlingResulst != '2'">
							<view>{{ willInfo.opinionClassifyName }}</view>
						</u-form-item>
					</u-form>
				</view>
				<view class="form-box" v-else>
					<u-form :model="form">
						<u-form-item class="form-item" required label="处理意见" labelAlign="left" label-width="150" prop="idea">
							<u-radio-group v-model="idea" @change="ideaGroupChange" :key="idea">
								<u-radio v-for="(item, index) in ideaList" :key="index" :name="item.name">{{ item.label }}</u-radio>
							</u-radio-group>
						</u-form-item>

						<u-form-item class="form-item" required label="问题分类" labelAlign="left" label-width="150" prop="type" v-if="idea != '2'">
							<u-radio-group v-model="type" @change="typeGroupChange" :key="type">
								<u-radio v-for="(item, index) in typeList" :key="index" :name="item.name" width="260">{{ item.label }}</u-radio>
							</u-radio-group>
						</u-form-item>
					</u-form>
				</view>

				<view class="fiexd-btm">
					<u-button class="form-btn" type="error" @click="confirm" v-if="flag">保存</u-button>
					<view class="flex-box" v-else>
						<u-button class="form-btn" type="error" @click="confirm1">确认</u-button>
						<u-button class="form-btn" type="error" @click="flag = true">修改</u-button>
					</view>
				</view>
			</block>
		</block>

		<block v-if="willInfo.nodeStatus > 1 && willInfo.handlingResulst != 2">
			<view class="com-h2"><text class="text">问题审查</text></view>
			<view class="form-box">
				<u-form>
					<u-form-item class="form-item" label="处理意见" labelAlign="left" label-width="190">
						<view>{{ willInfo.handlingResulstName }}</view>
					</u-form-item>

					<u-form-item class="form-item" label="问题分类" labelAlign="left" label-width="190">
						<view>{{ willInfo.opinionClassifyName }}</view>
					</u-form-item>
				</u-form>
			</view>
		</block>

		<block v-if="willInfo.nodeStatus != 1 && willInfo.handlingResulst == 2">
			<view class="com-h2"><text class="text">审查结果</text></view>
			<view class="form-box">
				<u-form>
					<u-form-item class="form-item" label="处理意见" labelAlign="left" label-width="190">
						<view>{{ willInfo.handlingResulstName }}</view>
					</u-form-item>
				</u-form>
			</view>
		</block>

		<block v-if="willInfo.nodeStatus == 2 && willInfo.representiveId == userId">
			<view class="com-h2"><text class="text">问题答复</text></view>
			<view class="form-box">
				<u-form :model="form1">
					<u-form-item class="form-item" required label="答复内容" labelAlign="left" label-width="190" prop="opinion">
						<u-input inputAlign="left" v-model="form1.opinion" type="textarea" placeholder="请输入正文内容" :clearable="false" :height="160" :maxlength="-1" />
					</u-form-item>

					<u-form-item class="form-item" label=" " labelAlign="left" label-width="0">
						<uni-file-upload width="690rpx"><view class="node" style="margin-top: 0;">上传文件</view></uni-file-upload>
					</u-form-item>
					<u-form-item class="form-item" label=" " labelAlign="left" label-width="0">
						<uni-file-upload width="690rpx" type="image" :limit="10"><view class="node">上传图片</view></uni-file-upload>
					</u-form-item>
				</u-form>
			</view>

			<view class="fiexd-btm"><u-button class="form-btn" type="error" @click="confirm2">提交</u-button></view>
		</block>

		<block v-if="willInfo.nodeStatus == 2 && willInfo.handleFlag == 1 && $roleCodes('llz_gly_new') && willInfo.stationId == stationId">
			<view class="com-h2"><text class="text">问题答复</text></view>
			<view class="form-box" v-if="!flag">
				<u-form>
					<u-form-item class="form-item" label="答复时间" labelAlign="left" label-width="190">{{ form1.createTime }}</u-form-item>
					<u-form-item class="form-item" label="答复内容" labelAlign="left" label-width="190">
						<view class="text-l">{{ form1.opinion }}</view>
					</u-form-item>

					<view class="file-list" v-if="fileList3.length > 0">
						<view>附件:</view>
						<view class="file-item" v-for="(item, index) in fileList3" :key="index" @click="$showLine(item)">
							<view class="file-name clamp">{{ item.name }}</view>
							<view class="right-type">预览</view>
						</view>
					</view>
				</u-form>
			</view>
			<view class="form-box" v-else>
				<u-form :model="form1">
					<u-form-item class="form-item" required label="答复内容" labelAlign="left" label-width="190" prop="opinion">
						<u-input inputAlign="left" v-model="form1.opinion" type="textarea" placeholder="请输入正文内容" :clearable="false" :height="160" :maxlength="-1" />
					</u-form-item>

					<u-form-item class="form-item" label=" " labelAlign="left" label-width="0">
						<uni-file-upload width="690rpx"><view class="node" style="margin-top: 0;">上传文件</view></uni-file-upload>
					</u-form-item>
					<u-form-item class="form-item" label=" " labelAlign="left" label-width="0">
						<uni-file-upload width="690rpx" type="image" :limit="10"><view class="node">上传图片</view></uni-file-upload>
					</u-form-item>
				</u-form>
			</view>

			<view class="fiexd-btm">
				<u-button class="form-btn" type="error" @click="confirm3" v-if="flag">保存</u-button>
				<view class="flex-box" v-else>
					<u-button class="form-btn" type="error" @click="confirm4">确认</u-button>
					<u-button class="form-btn" type="error" @click="flag = true">修改</u-button>
				</view>
			</view>
		</block>

		<block v-if="willInfo.nodeStatus > 2 && form1.id">
			<view class="com-h2"><text class="text">问题答复</text></view>
			<view class="form-box">
				<u-form>
					<u-form-item class="form-item" label="答复时间" labelAlign="left" label-width="190">{{ form1.createTime }}</u-form-item>
					<u-form-item class="form-item" label="答复内容" labelAlign="left" label-width="190">
						<view class="text-l">{{ form1.opinion }}</view>
					</u-form-item>

					<view class="file-list" v-if="fileList3.length > 0">
						<view>附件:</view>
						<view class="file-item" v-for="(item, index) in fileList3" :key="index" @click="$showLine(item)">
							<view class="file-name clamp">{{ item.name }}</view>
							<view class="right-type">预览</view>
						</view>
					</view>
				</u-form>
			</view>
		</block>

		<block v-if="willInfo.nodeStatus == 3 && willInfo.representiveId == userId">
			<view class="com-h2"><text class="text">二次答复</text></view>
			<view class="form-box">
				<u-form :model="form2">
					<u-form-item class="form-item" required label="答复内容" labelAlign="left" label-width="190" prop="opinion">
						<u-input inputAlign="left" v-model="form2.opinion" type="textarea" placeholder="请输入正文内容" :clearable="false" :height="160" :maxlength="-1" />
					</u-form-item>

					<u-form-item class="form-item" label=" " labelAlign="left" label-width="0">
						<uni-file-upload width="690rpx"><view class="node" style="margin-top: 0;">上传文件</view></uni-file-upload>
					</u-form-item>
					<u-form-item class="form-item" label=" " labelAlign="left" label-width="0">
						<uni-file-upload width="690rpx" type="image" :limit="10"><view class="node">上传图片</view></uni-file-upload>
					</u-form-item>
				</u-form>
			</view>

			<view class="fiexd-btm">
				<view class="flex-box">
					<u-button class="form-btn" type="error" @click="confirm5">提交</u-button>
					<u-button class="form-btn" type="error" @click="confirm6">办结</u-button>
				</view>
			</view>
		</block>

		<block v-if="willInfo.nodeStatus == 3 && willInfo.handleFlag == 3 && $roleCodes('llz_gly_new') && willInfo.stationId == stationId">
			<view class="com-h2"><text class="text">问题办结</text></view>
			<view class="form-box">
				<u-form>
					<u-form-item class="form-item" label="办结时间" labelAlign="left" label-width="190">
						<view>{{ willInfo.updateTime }}</view>
					</u-form-item>

					<u-form-item class="form-item" label="办结人" labelAlign="left" label-width="190">
						<view>{{ willInfo.representiveName }}</view>
					</u-form-item>
				</u-form>
			</view>

			<view class="fiexd-btm"><u-button class="form-btn" type="error" @click="confirm9">确认</u-button></view>
		</block>

		<block v-if="willInfo.nodeStatus == 3 && willInfo.handleFlag == 4 && $roleCodes('llz_gly_new') && willInfo.stationId == stationId">
			<view class="com-h2"><text class="text">二次答复</text></view>
			<view class="form-box" v-if="!flag">
				<u-form>
					<u-form-item class="form-item" label="答复时间" labelAlign="left" label-width="190">{{ form2.createTime }}</u-form-item>
					<u-form-item class="form-item" label="答复内容" labelAlign="left" label-width="190">
						<view class="text-l">{{ form2.opinion }}</view>
					</u-form-item>

					<view class="file-list" v-if="fileList4.length > 0">
						<view>附件:</view>
						<view class="file-item" v-for="(item, index) in fileList4" :key="index" @click="$showLine(item)">
							<view class="file-name clamp">{{ item.name }}</view>
							<view class="right-type">预览</view>
						</view>
					</view>
				</u-form>
			</view>
			<view class="form-box" v-else>
				<u-form :model="form2">
					<u-form-item class="form-item" required label="答复内容" labelAlign="left" label-width="190" prop="opinion">
						<u-input inputAlign="left" v-model="form2.opinion" type="textarea" placeholder="请输入正文内容" :clearable="false" :height="160" :maxlength="-1" />
					</u-form-item>

					<u-form-item class="form-item" label=" " labelAlign="left" label-width="0">
						<uni-file-upload width="690rpx"><view class="node" style="margin-top: 0;">上传文件</view></uni-file-upload>
					</u-form-item>
					<u-form-item class="form-item" label=" " labelAlign="left" label-width="0">
						<uni-file-upload width="690rpx" type="image" :limit="10"><view class="node">上传图片</view></uni-file-upload>
					</u-form-item>
				</u-form>
			</view>

			<view class="fiexd-btm">
				<u-button class="form-btn" type="error" @click="confirm7" v-if="flag">保存</u-button>
				<view class="flex-box" v-else>
					<u-button class="form-btn" type="error" @click="confirm8">确认</u-button>
					<u-button class="form-btn" type="error" @click="flag = true">修改</u-button>
				</view>
			</view>
		</block>

		<block v-if="willInfo.nodeStatus > 3 && form2.id">
			<view class="com-h2"><text class="text">二次答复</text></view>
			<view class="form-box">
				<u-form>
					<u-form-item class="form-item" label="答复时间" labelAlign="left" label-width="190">{{ form2.createTime }}</u-form-item>
					<u-form-item class="form-item" label="答复内容" labelAlign="left" label-width="190">
						<view class="text-l">{{ form2.opinion }}</view>
					</u-form-item>

					<view class="file-list" v-if="fileList4.length > 0">
						<view>附件:</view>
						<view class="file-item" v-for="(item, index) in fileList4" :key="index" @click="$showLine(item)">
							<view class="file-name clamp">{{ item.name }}</view>
							<view class="right-type">预览</view>
						</view>
					</view>
				</u-form>
			</view>
		</block>

		<block v-if="willInfo.nodeStatus == 4">
			<view class="com-h2"><text class="text">问题办结</text></view>
			<view class="form-box">
				<u-form>
					<u-form-item class="form-item" label="办结时间" labelAlign="left" label-width="190">
						<view>{{ willInfo.updateTime }}</view>
					</u-form-item>

					<u-form-item class="form-item" label="办结人" labelAlign="left" label-width="190">
						<view>{{ willInfo.representiveName }}</view>
					</u-form-item>
				</u-form>
			</view>
		</block>

		<view v-if="false || hisList || fileList"></view>
	</view>
</template>

<script>
import uniFileUpload from '@/components/uni-file-uploader.vue';
import uniParse from '@/components/uni-parse/parse.vue';
import selectTree from '@/components/uni-select-tree.vue';
import { mapState } from 'vuex';
export default {
	components: {
		uniFileUpload,
		uniParse,
		selectTree
	},
	data() {
		return {
			statusMap: {
				0: '所有',
				1: '待审查',
				2: '办理中',
				3: '已答复',
				4: '已办结',
				5: '不予受理'
			},

			type: '',
			typeShow: false,
			typeList: [],

			idea: '',
			ideaShow: false,
			ideaList: [],

			id: '',
			userId: '',
			stationId: '',
			status: '1',
			willResult: {},
			willInfo: {},
			hisList: [],
			fileList2: [],
			fileList3: [],
			fileList4: [],
			form: {
				type: '',
				idea: '',
				opinion: ''
			},
			form1: {
				id: '',
				createTime: '',
				opinion: ''
			},
			form2: {
				id: '',
				type: '',
				idea: '',
				createTime: '',
				opinion: ''
			},
			rules: {
				type: [
					{
						required: true,
						message: '请选择问题分类',
						trigger: 'change'
					}
				],
				idea: [
					{
						required: true,
						message: '请选择处理意见',
						trigger: 'change'
					}
				],
				reasons: [
					{
						required: true,
						message: '请输入说明理由',
						trigger: 'change'
					}
				]
			},
			key: -1,
			flag: false,
			play: false
		};
	},
	onLoad(option) {
		this.loadLogin();
		this.id = option.id;
		if (option.status) {
			this.status = option.status;
		}
		this.loadDict('opinionClassify', 'typeList');
		this.loadDict('handlingResulst', 'ideaList');

		this.loadData();
	},
	onReady() {
		// this.$refs.uForm.setRules(this.rules);
	},
	onHide() {
		this.$ttsOff();
	},
	onUnload() {
		this.$ttsOff();
		this.$store.commit('filePush', []);
	},
	computed: {
		...mapState(['userInfo', 'fileList'])
	},
	methods: {
		loadLogin() {
			if (this.userInfo.sysUser) {
				this.clientCode = this.userInfo.sysUser.clientCode;
				this.userId = this.userInfo.sysUser.id;
				this.stationId = this.userInfo.userInfo.stationId;
				this.roleCodes = this.userInfo.roleCodes.join(',');
			} else {
				this.$logout();
			}
		},
		loadDict(type, list, value) {
			this.$request('/system/sys-dict/dictList', {
				clientCode: this.clientCode,
				sysDict: {
					dictType: type
				}
			}).then(res => {
				if (!res.data) {
					return false;
				}
				this[list] = [];
				res.data.forEach(item => {
					this[list].push({
						name: item.dictValue,
						value: item.dictValue,
						label: item.dictName
					});
				});
			});
		},
		loadData() {
			this.$request('/minqingzhitong/msPublicOpinion/get', {
				id: this.id,
				userId: this.userId
			}).then(res => {
				if (!res.data) {
					this.$msg('暂无数据');
					return false;
				}
				this.fileList2 = res.data.fileList;
				this.willInfo = res.data.msPublicOpinion;
				this.hisList = res.data.msPublicOpinionHisList;
				if (this.willInfo.handlingResulst) {
					this.idea = this.willInfo.handlingResulst;
					this.form.idea = this.willInfo.handlingResulst;
				}
				if (this.willInfo.opinionClassify) {
					this.type = this.willInfo.opinionClassify;
					this.form.type = this.willInfo.opinionClassify;
				}
				if (this.hisList.length > 0) {
					this.form1.createTime = this.hisList[0].msPublicOpinionHis.createTime;
					this.form1.opinion = this.hisList[0].msPublicOpinionHis.opinion;
					this.form1.id = this.hisList[0].msPublicOpinionHis.id;
					this.fileList3 = this.hisList[0].hisFileList;
					if (this.willInfo.nodeStatus == 2) {
						this.$store.commit('filePush', this.hisList[0].hisFileList);
					}
				}
				if (this.hisList.length > 1) {
					this.form2.createTime = this.hisList[1].msPublicOpinionHis.createTime;
					this.form2.opinion = this.hisList[1].msPublicOpinionHis.opinion;
					this.form2.id = this.hisList[1].msPublicOpinionHis.id;
					this.fileList4 = this.hisList[1].hisFileList;
					if (this.willInfo.nodeStatus == 3) {
						this.$store.commit('filePush', this.hisList[1].hisFileList);
					}
				}
			});
		},
		typeConfirm(e) {
			this.type = e[0].label;
			this.form.type = e[0].value;
		},
		typeGroupChange(e) {
			this.type = e;
			this.form.type = e;
		},
		ideaConfirm(e) {
			this.idea = e[0].label;
			this.form.idea = e[0].value;
		},
		ideaGroupChange(e) {
			this.idea = e;
			this.form.idea = e;
		},
		confirm() {
			let data = {};
			data = {
				handlingResulst: this.form.idea,
				role: this.roleCodes,
				opinionClassify: this.form.type,
				id: this.willInfo.id
			};

			if (!data.handlingResulst) {
				this.$msg('请选择处理意见');
				return false;
			}
			if (!data.opinionClassify && data.handlingResulst != '2') {
				this.$msg('请选择问题分类');
				return false;
			}

			let url = '/minqingzhitong/msPublicOpinion/save';
			this.$request(url, data, {
				load: true
			}).then(res => {
				this.flag = false;
				this.$msg(res.msg);
				this.navigateBack();
			});
		},
		confirm1() {
			let data = {};
			data = {
				handlingResulst: this.form.idea,
				id: this.willInfo.id
			};

			let url = '/minqingzhitong/msPublicOpinion/stationExamine';
			this.$request(url, data, {
				load: true
			}).then(res => {
				this.$msg(res.msg);
				this.back();
			});
		},
		confirm2() {
			let data = {};
			data = {
				id: this.willInfo.id,
				opinion: this.form1.opinion,
				fileList: this.fileList
			};

			if (!data.opinion) {
				this.$msg('请输入答复内容');
				return false;
			}

			let url = '/minqingzhitong/msPublicOpinion/reply';
			this.$request(url, data, {
				load: true
			}).then(res => {
				this.$msg(res.msg);
				this.back();
			});
		},
		confirm3() {
			let data = {};
			data = {
				id: this.form1.id,
				opinion: this.form1.opinion,
				fileList: this.fileList
			};

			if (!data.opinion) {
				this.$msg('请输入答复内容');
				return false;
			}

			let url = '/minqingzhitong/msPublicOpinionHis/save';
			this.$request(url, data, {
				load: true
			}).then(res => {
				this.flag = false;
				this.$msg(res.msg);
				this.back();
			});
		},
		confirm4() {
			let data = {};
			data = {
				id: this.willInfo.id
			};

			let url = '/minqingzhitong/msPublicOpinion/stationExamineReply';
			this.$request(url, data, {
				load: true
			}).then(res => {
				this.$msg(res.msg);
				this.back();
			});
		},
		confirm5() {
			let data = {};
			data = {
				id: this.willInfo.id,
				opinion: this.form2.opinion,
				fileList: this.fileList
			};

			if (!data.opinion) {
				this.$msg('请输入答复内容');
				return false;
			}

			let url = '/minqingzhitong/msPublicOpinion/replyAgain';
			this.$request(url, data, {
				load: true
			}).then(res => {
				this.flag = false;
				this.$msg(res.msg);
				this.back();
			});
		},
		confirm6() {
			let data = {};
			data = {
				id: this.willInfo.id
			};

			let url = '/minqingzhitong/msPublicOpinion/finish';
			uni.showModal({
				title: '提示',
				content: '是否确认办结此问题？',
				success: res => {
					if (res.confirm) {
						this.$request(url, data, {
							load: true
						}).then(res => {
							this.$msg(res.msg);
							this.back();
						});
					} else if (res.cancel) {
						console.log('用户点击取消');
					}
				}
			});
		},
		confirm7() {
			let data = {};
			data = {
				id: this.form2.id,
				opinion: this.form2.opinion,
				fileList: this.fileList
			};

			if (!data.opinion) {
				this.$msg('请输入答复内容');
				return false;
			}

			let url = '/minqingzhitong/msPublicOpinionHis/save';
			this.$request(url, data, {
				load: true
			}).then(res => {
				this.flag = false;
				this.$msg(res.msg);
				this.back();
			});
		},
		confirm8() {
			let data = {};
			data = {
				id: this.willInfo.id
			};

			let url = '/minqingzhitong/msPublicOpinion/stationExamineReplyAgain';
			this.$request(url, data, {
				load: true
			}).then(res => {
				this.$msg(res.msg);
				this.back();
			});
		},
		confirm9() {
			let data = {};
			data = {
				id: this.willInfo.id
			};

			let url = '/minqingzhitong/msPublicOpinion/stationExamineFinish';
			uni.showModal({
				title: '提示',
				content: '是否确认办结此问题？',
				success: res => {
					if (res.confirm) {
						this.$request(url, data, {
							load: true
						}).then(res => {
							this.$msg(res.msg);
							this.back();
						});
					} else if (res.cancel) {
						console.log('用户点击取消');
					}
				}
			});
		},
		back(e) {
			this.navigateBack();
		},
		navigateBack(e) {
			setTimeout(() => {
				let pre = this.$prePage();
				if (pre && pre.loadData) {
					pre.loadData('refresh');
				}
				uni.navigateBack();
				this.loadData();
			}, 500);
		},
		call(e) {
			uni.makePhoneCall({
				phoneNumber: e.phone
			});
		},
		onTts() {
			let text = this.willInfo.createName || '';
			text += '，时间：' + this.willInfo.createTime;
			text += '，联系电话：' + this.willInfo.phone;
			text += '，问题编号：' + this.willInfo.opinionNo;
			text += '，代表：' + this.willInfo.representiveName;
			text += '，' + this.willInfo.opinionTypeName;
			text += '，' + this.willInfo.opinionDescribe;
			text += '，发生地点：' + this.willInfo.address;
			this.$tts(text, this, 500);
		},
		previewImage(idx, images) {
			uni.previewImage({
				current: idx,
				urls: images
			});
		}
	}
};
</script>

<style lang="scss">
.detail-view {
	background-color: #fff;
}

.detail-info {
	padding: 0 0 30rpx;

	.overflow {
		padding: 20rpx 30rpx 0;
	}

	.com-box {
		margin-top: 30rpx;
		padding: 10rpx 20rpx;
		font-size: 14px;
		font-weight: 500;
		color: #333;
		line-height: 40rpx;
		border-radius: 36rpx;
		background: #f6f7fb;
	}
}

.site-box {
	padding: 30rpx 30rpx 0;
	background-color: #f5f7fa;
}

.p-info {
	display: flex;
	flex-wrap: wrap;
	margin-bottom: 10rpx;
	padding: 26rpx 30rpx 48rpx;
	background-color: #fff;
	border-radius: 16rpx;

	.left {
		width: 180rpx;
		height: 170rpx;
		border-radius: 12rpx;

		.image {
			width: 180rpx;
			height: 170rpx;
			border-radius: 12rpx;
		}
	}

	.p-name {
		margin-bottom: 26rpx;
		padding-bottom: 18rpx;
		width: 100%;
		font-size: 17px;
		font-weight: 600;
		color: #333;
		line-height: 48rpx;
		border-bottom: 2rpx solid #f6f7fb;
	}

	.p-time,
	.p-phone,
	.p-no {
		margin-bottom: 5rpx;
	}

	.p-addr {
	}

	.right {
		flex: 1;
		width: 0;
		padding-left: 32rpx;
		font-size: 14px;
		color: #666;
		line-height: 40rpx;

		.image {
			width: 80rpx;
			height: 80rpx;
		}
	}
}

.label-info {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	font-size: 16px;
	color: #333;
	line-height: 44rpx;

	.item {
		padding: 20rpx 0;
		width: 50%;
		min-width: 30%;
		text-align: center;
	}

	.icon {
		margin-right: 5rpx;
		vertical-align: top;
	}
}

.site-info {
	margin-bottom: 20rpx;
	padding: 30rpx;
	font-size: 17px;
	color: #333;
	line-height: 52rpx;
	background-color: #fff;

	.h2-ttl {
		margin-bottom: 24rpx;
		font-size: 17px;
		font-weight: 600;
		color: #333;
		line-height: 48rpx;
	}
}

.node {
	margin: 20rpx 0 0 20rpx;
	font-size: 14px;
	color: #9b9b9b;
	line-height: 120rpx;
}

.sched-box {
	padding: 10rpx 50rpx;
}

.form-box {
	.form-item {
		@include mp-flex;
		// border-bottom: 20rpx solid #f5f7fa;

		.text-l {
			text-align: left;
		}
	}
}

.filter-box {
	position: fixed;
	left: 0;
	bottom: 0;
	right: 0;
	z-index: 998;
	background-color: #fff;
}

.fiexd-btm {
	position: static;
	padding: 30rpx;
}
</style>
